package com.ruoyi.ring.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ring.mapper.RingStressChangeInfoMapper;
import com.ruoyi.ring.domain.RingStressChangeInfo;
import com.ruoyi.ring.service.IRingStressChangeInfoService;

/**
 * 压力信息Service业务层处理
 * 
 * @author liuwp
 * @date 2025-09-08
 */
@Service
public class RingStressChangeInfoServiceImpl implements IRingStressChangeInfoService 
{
    @Autowired
    private RingStressChangeInfoMapper ringStressChangeInfoMapper;

    /**
     * 查询压力信息
     * 
     * @param id 压力信息主键
     * @return 压力信息
     */
    @Override
    public RingStressChangeInfo selectRingStressChangeInfoById(Long id)
    {
        return ringStressChangeInfoMapper.selectRingStressChangeInfoById(id);
    }

    /**
     * 查询压力信息列表
     * 
     * @param ringStressChangeInfo 压力信息
     * @return 压力信息
     */
    @Override
    public List<RingStressChangeInfo> selectRingStressChangeInfoList(RingStressChangeInfo ringStressChangeInfo)
    {
        return ringStressChangeInfoMapper.selectRingStressChangeInfoList(ringStressChangeInfo);
    }

    /**
     * 根据业务主键查询一条记录：压力信息
     *
     * @param ringStressChangeInfo 压力信息
     * @return 压力信息
     */
    @Override
    public RingStressChangeInfo selectOneRingStressChangeInfo(RingStressChangeInfo ringStressChangeInfo)
    {
        return ringStressChangeInfoMapper.selectOneRingStressChangeInfo(ringStressChangeInfo);
    }

    /**
     * 新增压力信息
     * 
     * @param ringStressChangeInfo 压力信息
     * @return 结果
     */
    @Override
    public int insertRingStressChangeInfo(RingStressChangeInfo ringStressChangeInfo)
    {
        ringStressChangeInfo.setCreateTime(DateUtils.getNowDate());
        return ringStressChangeInfoMapper.insertRingStressChangeInfo(ringStressChangeInfo);
    }

    /**
     * 修改压力信息
     * 
     * @param ringStressChangeInfo 压力信息
     * @return 结果
     */
    @Override
    public int updateRingStressChangeInfo(RingStressChangeInfo ringStressChangeInfo)
    {
        ringStressChangeInfo.setUpdateTime(DateUtils.getNowDate());
        return ringStressChangeInfoMapper.updateRingStressChangeInfo(ringStressChangeInfo);
    }

    @Override
    public int updateRingStressChangeInfoCondition(RingStressChangeInfo ringStressChangeInfo, RingStressChangeInfo ringStressChangeInfoCondition)
    {
                ringStressChangeInfo.setUpdateTime(DateUtils.getNowDate());
        return ringStressChangeInfoMapper.updateRingStressChangeInfoCondition(ringStressChangeInfo, ringStressChangeInfoCondition);
    }

    /**
     * 批量删除压力信息
     * 
     * @param ids 需要删除的压力信息主键
     * @return 结果
     */
    @Override
    public int deleteRingStressChangeInfoByIds(Long[] ids)
    {
        return ringStressChangeInfoMapper.deleteRingStressChangeInfoByIds(ids);
    }

    /**
     * 删除压力信息信息
     * 
     * @param id 压力信息主键
     * @return 结果
     */
    @Override
    public int deleteRingStressChangeInfoById(Long id)
    {
        return ringStressChangeInfoMapper.deleteRingStressChangeInfoById(id);
    }

    /**
     * 条件删除压力信息
     *
     * @param ringStressChangeInfo 压力信息
     * @return 结果
     */
    @Override
    public int deleteRingStressChangeInfoByCondition(RingStressChangeInfo ringStressChangeInfo)
    {
        return ringStressChangeInfoMapper.deleteRingStressChangeInfoByCondition(ringStressChangeInfo);
    }

}
